package com.bparser.parser;

import java.util.Map;

import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class AtmParser implements Parser {

	private static final String URL = "http://ru.kkb.kz/cards/page/Atm";
	Map<Integer, String> data;

	@Override
	public void execute(String htmlSource) {
		Elements tableRows = Utils
				.getAllElementFromString(htmlSource,
						"table[class=tbl_text2] > tbody").get(2).select("tr");
		for (Element row : tableRows) {
			if (row.select("td").size() <= 3)
				continue;
			for (Element col : row.select("td")) {
				System.out.println(col.text());
			}
		}
		System.out.println();
	}

	@Override
	public Map<Integer, String> retrieveData() {
		return data;
	}

	@Override
	public String getURL() {
		return URL;
	}
}
